const path = require("path")

function reslove(path) {
    return path.join(__dirname,path)
}

module.exports = {
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      // 指定那些文件自动注入,使用绝对路径
      patterns: [
        reslove("./src/assets/styles/variables.less"),
        reslove("./src/assets/styles/mixins.less")
      ]
    }
  },
  chainWebpack: config => {
    // 开启IP或者域名访问
    config.devServer.disableHostCheck(true)
  },
  // 外部打包扩展,代码优化(模块不需要打包)
  configureWebpack: {
    externals: {
      qc: "QC"
    }
  }
}
